package com.sdlh.demo.springboot;

import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@Slf4j
@SpringBootApplication(scanBasePackages = "com.sdlh.demo.springboot")
@MapperScan("com.sdlh.demo.springboot.dao")
public class SpringBootDemo {

    public static void main(String[] args) {
        SpringApplication.run(SpringBootDemo.class, args);
        Runtime.getRuntime().addShutdownHook(new Thread(() -> {
            log.info("--------接收到退出信号，程序开始回收资源准备退出--------");
            log.info("--------资源回收完毕，程序退出--------");
        }));
        log.info("主线程退出......");
    }
}
